//模板字符串

let title = '标题';

// let str1 = '<h1>';

// str1 += title;

// str1 += '</h1>';

let str = `<h1>${title}</h1>`;

//拼接sql语句

console.log(str.includes('h1'));

//startsWith() 必须以指定字符开头

//vue  指令 v-

// <input type="text" v-model="username"/>


// 

let ipt = document.querySelector('#ipt');

console.log([...ipt.attributes]);

let attrs = [...ipt.attributes];

for(let  i = 0;i<attrs.length;i++){
    console.log(attrs[i]);

    let key = attrs[i].name;
    // console.log(typeof key)
    if(key.startsWith('v-')){
        console.log("attrs[i]=======",attrs[i])
    }
}

//endsWith  判断是否以指定字符结尾   boolean

// .png jpg .jpeg ...

// .js  .css  .html ...


console.log('1.jpg'.endsWith('.jpg'))






